Background offset calibration of a high-speed analog signal comparator

ABSTRACT

A background offset calibration system for an analog signal comparator provides low offset without compromising tracking bandwidth. The comparator includes a preamplifier and a decision latch. A switching selectively couples outputs of an analog circuit to the inputs of the preamplifier stage. A state control logic alternatively operates the system in a first phase in which the analog circuit acquires an input signal while the comparator is calibrated, and a second phase in which a comparison is performed by the comparator. In the first phase, the switching circuit disconnects the outputs of the analog circuit from the preamplifier stage and applies a common mode reference to the inputs of the preamplifier. An offset correction circuit determines correction changes from a history of states of the decision latch across multiple sampling cycles. The offset correction circuit adjusts a threshold voltage of the decision latch by applying the correction changes.

BACKGROUND 1. Field of Disclosure

The field of representative embodiments of this disclosure relates tocalibration of high-speed comparators as used in analog-to-digitalconverters (ADCs) and digital-to-analog converters (DACs), and inparticular to comparator auto-zero calibration systems and techniques.

2. Background

Analog signal comparators are in common use in data converters, e.g.,ADCs and DACs, as well as in other signal acquisition and comparisonsystems. In particular, for low-power applications,successive-approximation registers are selected as a data converter ofchoice, because the fundamental active component of such converters isthe comparator.

However, comparators suffer from variations in offset voltage due torandom element mis-match, an in high-speed devices in particular,mis-match is very problematic due to small device areas employed inhigh-speed circuits. Solutions to the mis-match problem includeconventional auto-zero (AZ) techniques, in which an offset-cancellationvoltage is sampled onto capacitors in advance of conversion, and whichis used to cancel the comparator offset during the comparator's decisionphase. In conventional AZ techniques, the offset contributions from thecomparator's output latch are not directly canceled, but are reduced bythe gain of the preamplifier stage(s) preceding the latch, therefore ahigh gain preamplifier is typically required in order to reducecomparator offset variation to required levels. However, as thepreamplifier gain is raised, the tracking bandwidth of the converter iscorrespondingly reduced.

Therefore, it would be advantageous to provide a method and system forcalibrating a high-speed comparator to remove offset that does notrequire increasing preamplifier gain of the comparator.

SUMMARY

Improved offset reduction is accomplished in comparators and comparatorcalibration systems, integrated circuits including the comparators andcomparator calibration systems, and their methods of operation.

The comparators and comparator calibration systems include an analogcircuit, an analog signal comparator that compares outputs of the analogcircuit, a switching circuit that selectively couples outputs of theanalog circuit to inputs of a preamplifier stage of the analog signalcomparator, a state control logic, and an offset correction circuit. Theanalog signal comparator includes the preamplifier stage and a decisionlatch that samples an output of the preamplifier stage to generate anoutput state of the analog signal comparator. The state control logicalternatively operates the system in a first phase in which the analogcircuit acquires an input signal and the analog signal comparator isbeing calibrated, and a second phase in which an output of the analogcircuit is compared by the analog signal comparator. A sampling cycleincludes operating the system in the first phase and then the secondphase. In the first phase, the state control logic controls theswitching circuit to disconnect the outputs of the analog circuit fromthe inputs of the preamplifier stage of the analog signal comparator andthe switching circuit applies a common mode reference to the inputs ofthe preamplifier stage of the analog signal comparator. The offsetcorrection circuit determines an offset correction change dependent on ahistory of states of an output of the decision latch across multiplesampling cycles of the system. An output of the offset correctioncircuit is coupled to an offset input of the decision latch of theanalog signal comparator to adjust a threshold voltage of the decisionlatch in conformity with the history of the states of the output of thedecision latch.

The summary above is provided for brief explanation and does notrestrict the scope of the claims. The description below sets forthexample embodiments according to this disclosure. Further embodimentsand implementations will be apparent to those having ordinary skill inthe art. Persons having ordinary skill in the art will recognize thatvarious equivalent techniques may be applied in lieu of, or inconjunction with, the embodiments discussed below, and all suchequivalents are encompassed by the present disclosure.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1A is a simplified schematic diagram illustrating an exampletopology of a prior art closed-loop auto-zero comparator circuit 5A.

FIG. 1B is a simplified schematic diagram illustrating an exampletopology of a prior art open-loop auto-zero comparator circuit 5B.

FIG. 2A is a block diagram illustrating an example successiveapproximation register (SAR) analog-to-digital converter (ADC) 10 andFIG. 2B shows an example cycle timing diagram 11 illustrating operationof example SAR ADC 10 of FIG. 2A, in accordance with an embodiment ofthe disclosure.

FIG. 3A is a schematic diagram of an example latch circuit 20A that maybe used within comparator 14 in SAR ADC 10 of FIG. 2A, in accordancewith an embodiment of the disclosure.

FIG. 3B is a schematic diagram of another example latch circuit 20B thatmay be used within comparator 14 in SAR ADC 10 of FIG. 2A, in accordancewith another embodiment of the disclosure.

FIG. 4 is a schematic diagram of an example final stage 30 of an examplepreamplifier circuit that may be used within comparator 14 in SAR ADC 10of FIG. 2A, in accordance with an embodiment of the disclosure.

FIG. 5 is a block diagram of an example background-calibrated comparatorcircuit 14A that may be used to implement comparator 14 of FIG. 2A, inaccordance with an embodiment of the disclosure.

FIG. 6 is a block diagram of an example calibration control circuit 50Athat may be used implement calibration control circuit 50 inbackground-calibrated comparator circuit 14A of FIG. 5 , in accordancewith an embodiment of the disclosure.

FIG. 7 is a block diagram of another example calibration control circuit50B that may be used implement calibration control circuit 50 inbackground-calibrated comparator circuit 14A of FIG. 5 , in accordancewith another embodiment of the disclosure.

FIG. 8 is an example state diagram illustrating an example operation SARsequencer 15 in SAR ADC 10 of FIG. 2A, in accordance with an embodimentof the disclosure.

FIG. 9 is a block diagram of an example built-in self-test (BIST)circuit 70, in accordance with an embodiment of the disclosure.

FIGS. 10-12 are example graphs illustrating operation and performance ofSAR ADC 10 of FIG. 2A, in accordance with an embodiment of thedisclosure.

DETAILED DESCRIPTION OF ILLUSTRATIVE EMBODIMENT

The present disclosure encompasses circuits and integrated circuits thatinclude background-calibrated comparators. The systems may include ananalog circuit, an analog signal comparator that compares outputs of theanalog circuit, a switching circuit that selectively couples outputs ofthe analog circuit to inputs of a preamplifier stage of the analogsignal comparator, a state control logic, and an offset correctioncircuit. The analog signal comparator includes the preamplifier stageand a decision latch that samples an output of the preamplifier stage togenerate an output state of the analog signal comparator. The statecontrol logic may operate the system in alternation between a firstphase in which the analog circuit acquires an input signal and theanalog signal comparator is being calibrated, and a second phase inwhich an output of the analog circuit is compared by the analog signalcomparator.

FIG. 1A is a simplified schematic diagram illustrating an exampletopology of a prior art closed-loop auto-zero comparator circuit 5A. Apair of switches S1, S2 are used to selectively couple a differentialinput signal IN+, IN− to the comparator circuit 5A, in which apreamplifier circuit A1 has outputs coupled to inputs of a latch 4,which provides a comparator decision output signal decision as a binaryvalue, depending on a polarity of differential input signal IN+, IN−.Switches S1, S2 are closed during evaluation of differential inputsignal IN+, IN− and coupled to inputs of preamplifier circuit A1 througha pair of capacitors C1, C2 that hold an offset voltage obtained from aprevious auto-zero operation to cancel offset of comparator circuit 5A.During the auto-zero operation, switches S1, S2 are opened to isolatecomparator circuit 5A from differential input signal IN+, IN− and a pairof switches S3, S4 are closed to apply a common mode reference voltageV_(cm) to the inputs of preamplifier circuit A1 and another pair ofswitches S5, S6 are closed, which causes capacitors C1 and C2 to storean error charge that cancels the comparator offset represented byvoltage source VS1, which is not an actual component of the circuit. Theoffset error is reduced by the open loop gain of preamplifier A1, whichrequires a stable closed-loop response during autozeroing that places alimit on the speed of comparator circuit 5A, especially when the gain ofpreamplifier A1 is large.

FIG. 1B is a simplified schematic diagram illustrating an exampletopology of a prior art open-loop comparator circuit 5B. Comparatorcircuit 5B is similar to comparator 5A of FIG. 1A, so only differencesbetween them are described below. Rather than reducing the gain ofpreamplifier A1 to unity via switches S5, S6 in comparator 5A, duringautozeroing of comparator 5B, preamplifier A1 is operated open-loop, andthe offset error charge of preamplifier A1 is stored on a pair ofcapacitors C3 and C4. The outputs of preamplifier A1 are coupled tolatch 4 by capacitors C3, C4 during normal operation of comparator 5B,so that the offset of comparator 4 is canceled by an error charge storedon capacitors C3, C4 during the auto-zero operation. The open-looptopology of comparator 5B avoids the stability requirement imposed oncomparator 5A. However, the open-loop gain of amplifier A1 must be lowenough to avoid output saturation of amplifier A1 from offset duringauto-zeroing. Therefore, several low gain preamplifier stages arefrequently cascaded in open-loop comparator topologies, in order tosuppress the offset due to latch 4, which could otherwise causesaturation of a high-gain preamplifier. However, the additionalpreamplifier stages each require capacitors to store their associatedoffset error, and the resultant chain of auto-zero capacitors andpreamplifier stages reduce the overall speed of the comparator Also, thepresence of capacitors C3, C4, and additional capacitors that would berequired between multiple low-gain preamplifier stage, has an adverseeffect on the speed comparator 5B.

Referring now to FIG. 2A, a block diagram illustrating an examplesuccessive approximation register (SAR) analog-to-digital converter(ACD) 10 is shown, in accordance with an embodiment of the disclosure.An input signal A_(IN) is sampled and held by a sample/hold block 12and, during an evaluation phase, converted to a digital output D_(OUT)by a successive approximation process controlled by a SAR sequencer 15that resolves digital output D_(OUT) one bit at a time from amost-significant bit (MSB) to a least-significant bit (LSB). Adigital-to-analog converter (DAC) 16 provides feedback of a present(approximated) value of digital output D_(OUT) provided from SARsequencer 15. A comparator 14 compares the output of DAC 16 to an inputvalue provided from the output of sample/hold block 12. The evaluationphase terminates once the LSB is resolved, and another conversion cyclemay begin. In accordance with an embodiment of the disclosure, SARsequencer 15 interleaves calibration phases with evaluation phases, sothat while sample/hold block 12 is acquiring input signal A_(IN), offsetcancelation internal to comparator 14 is calibrated. The above processprovides a background calibration that may be applied to high-speedcomparators, e.g., comparator 14, because offset contributions from boththe internal preamplifier and internal latch of comparator 14 may becanceled at the same time, and no trade-off between preamplifier gainand comparator tracking bandwidth is required. Referring additionally toFIG. 2B, an example cycle timing diagram 11 illustrates the interleaveof a comparator calibration phase 17 in which sample/hold block 12tracks and holds input signal A_(IN), while offset calibration isperformed under control of SAR sequencer 15. After comparatorcalibration phase 17, an evaluation phase 18 occurs, during which SARsequencer 15 performs successive approximation of the held value ofA_(IN) provided at the output of sample/hold block 12. Thus, comparatorbackground offset calibration may be updated for every ADC sample, asshown in cycle timing diagram 11 of FIG. 2B. Alternatively, a lower rateof calibration cycles may be used if the calibration algorithm isimplemented with a period of more than one sample per calibration cycle.While the above-described background calibration techniques aredescribed with respect to the depicted SAR ADC 10 of FIG. 2A, thetechniques may be applied to other systems in which extra calibrationcycles may be allocated for comparator calibration among the evaluationdecision cycles.

Referring now to FIG. 3A, a schematic diagram of an example latchcircuit 20A that may be used within comparator 14 in SAR ADC 10 of FIG.2 is shown, in accordance with an embodiment of the disclosure. Examplelatch circuit 20A has a structure similar to a conventional StrongARMlatch, but includes additional inputs that control biasing and offsetvoltage in example latch circuit 20A. Example latch circuit 20A isformed by two transistor ladders that include pull-up transistors P1A,P2A, P3A and transistors P1B, P2B, P3B for each “arm” of example latchcircuit 20A. A clock signal CLK controls conduction of a “tail” or“foot” transistor N4 and also pull-up transistors P1A, P1B, so that whenclock signal CLK is raised to a logical high voltage state, e.g., 5 VDC,transistor N4 conducts to permit example latch 20A to evaluate thedifferential voltage of inputs +in, −in. Output pull-up transistors P3A,P3B are cross-coupled and a next pair of transistors N3A, N3B down inthe ladders are cross-coupled, so that example latch 20A forms a fastbi-stable latch while transistor N4 is turned on, due to a high gainwith respect to inputs +in, −in. Prior to clock signal CLK beingasserted, clock signal CLK is in a logical low voltage state, e.g., 0VDC. A pair of input transistors N1A, N1B receive inputs +in, −in andtrack the differential input voltage. When clock signal CLK is raised tothe logical high voltage state, the instantaneous strobe currentconducted through transistor N4 flows through both “arms” of examplelatch 20A, but with different strength, according to the differencebetween voltage at inputs +in, −in, which due to the positive feedbackprovided by the cross-coupled pairs of output pull-up transistors P3A,P3B and ladder transistors N3A, N3B, causes the state of output out ofexample latch 20A to settle to a saturated state determined by thepolarity of the differential voltage between inputs +in, −in. Mismatchesbetween transistors in example latch 20A, and other offsets in thecomparator as described above, may be compensated-for by an offsetadjustment provision in example latch 20A, in accordance with anembodiment of the disclosure. A transistor N2B receives an offsetadjustment voltage V_(os) and a transistor N2A receives a bias voltageV_(b) that is generally set to the common mode voltage of inputs +in,−in, so that the operation of example latch 20A is offset-adjustable, byshifting the operating point of example latch 20A according to theprovided offset adjustment voltage V_(os) and bias voltage V_(b), whichwill change the decision threshold of the above-described evaluationthat occurs when tail transistor N4 is activated. Selection of thecalibration rate of the background calibration techniques describedherein may further be used to cancel 1/f noise of the transistors withinexample latch 20A and the preamplifier of comparator 14, for example, byselection of a calibration rate higher than twice the knee frequency ofthe 1/f noise characteristic. While example latch 20A provides anexample of a latch circuit that may be used within comparator 14 of inSAR ADC 10 of FIG. 2 , other type of latches may be employed andmodified according to the above-described example, and suchimplementations are contemplated in accordance with other embodiments ofthe disclosure.

FIG. 3B is a schematic diagram of another example latch circuit 20B thatmay be used within comparator 14 in SAR ADC 10 of FIG. 2 , in accordancewith another embodiment of the disclosure. Example latch circuit 20B issimilar to example latch circuit 20A of FIG. 3A, so only differencesbetween them will be described in further detail below. Example latchcircuit 20B includes multiple tail transistors N4A, N4B, rather than thesingle tail transistor N4 of example latch 20A. Tail transistor N4Bcontrols whether current may be drawn through transistors N2A, N2B,which are the transistors that apply the offset adjustment voltageV_(os) and bias voltage V_(b) to shift the decision threshold of examplelatch 20B. A delayed or advanced clock signal CLK′ controls theconduction of tail transistor N4B, which provides for time-domaincontrol of the degree to which offset adjustment voltage V_(os) affectsthe decision point, within a narrow range of delays that permit offsetadjustment voltage V_(os) and bias voltage V_(b) to shift the decisionthreshold of example latch 20B, before the positive feedback provided bythe cross-coupled pairs of output pull-up transistors P3A, P3B andladder transistors N3A, N3B, has caused the state of output out ofexample latch 20A to settle. Clock signal CLK′ may have a positive edgeearlier or later than the positive edge of clock signal CLK, and thephase difference between clock signal CLK and clock signal CLK′ willdetermine the effective offset adjustment introduced by offsetadjustment voltage V_(os) and bias voltage V_(b). The phase differencebetween clock signal CLK and clock signal CLK′ may be preciselycontrolled via digital logic, which provides direct digital control ofthe offset adjustment applied in example latch 20B. Time domaincalibration and voltage domain calibration may be combined to form aflexible two-dimensional calibration algorithm based on the decisionhistory of example comparator 20B, according to the offset calibrationtechniques disclosed herein.

Referring to FIG. 4 , a schematic diagram of an example final stage 30of an example preamplifier circuit that may be used within comparator 14in SAR ADC 10 of FIG. 2 is shown, in accordance with an embodiment ofthe disclosure. A current source I1 sets a current level through amirror transistor N11 that, in turn, sets the magnitude of the sum ofthe currents through a preamplifier output stage formed by transistorsN10A, N10B that receive a differential input voltage V_(inp), V_(inn),and resistors RIA, RIB and a bias stage formed by transistor N14 andresistor R1C, by setting the current returned through transistors N12,N13. Bias voltage output V_(b) is set by common-mode voltage inputV_(cm), which is set to the common mode voltage of differential inputvoltage V_(inp), V_(inn), so that bias voltage output V_(b) is equal tothe common-mode of differential output signal out and provides thecommon-mode input reference to example latches 20A, 20B as describedabove.

Referring now to FIG. 5 , a block diagram of an examplebackground-calibrated comparator circuit 14A that may be used toimplement comparator 14 of FIG. 2 is shown, in accordance with anembodiment of the disclosure. A pair of inputs IN+, IN− are coupledthrough a pair of switches S10A, S10B to a preamplifier A10. Anotherpair of switches S11A, 11B provide for applying common-mode voltagereference V_(cm) to the inputs of preamplifier A10 during backgroundcalibration. A latch 20, which may be, for example, implanted by examplelatch 20A or example latch 20B as described above, receives the outputof preamplifier 10 and provides a decision output decision in responseto a clock signal clk provided from a calibration control block 50.Offset voltage V_(opre) represents the total offset voltage ofpreamplifier A10, which is canceled along with the voltage offset oflatch 20. Calibration control block 50 provides offset adjustmentvoltage V_(os) to latch 20, which is determined in accordance withhistorical values of decision output decision over multiple calibrationcycles, and which compensates for the total offset of preamplifier A10and latch 20.

Referring now to FIG. 6 , a schematic diagram of an example calibrationcontrol circuit 50A that may be used to implement calibration controlcircuit 50 in background-calibrated comparator circuit 14A of FIG. 5 ,in accordance with an embodiment of the disclosure. A SAR sequencer 60controls operation of the background calibration process, and mayinclude other control signals for operation of a SAR ADC, such asexample SAR ADC 10 of FIG. 2 , or for controlling another type ofconverter or other circuit, and which also may be located external tocalibration control circuit 50A, in accordance with other embodiments ofthe disclosure. A clock signal clk is introduced to a pair of D-latchesQ1, Q2, with a delayed version of clock signal clk provided by theoutput of a delay circuit 20. A third D-latch Q3 is configured to toggleat each assertion of clock signal clk. A logic circuit formed by alogical-AND gate AND1 and a logical-OR gate OR1, provide a reset signalto reset D-latches Q1, Q2, after the leading edge of the delayed versionof clock signal clk has caused D-latch Q2 to toggle, asserting a logicsignal Late, which occurs after the leading edge of clock signal clk hascaused D-latch Q1 to be set, asserting a logic signal Early. D-latchesare also reset during every other cycle of clock signal clk when theoutput of D-latch Q3 is in a logical high state, so that calibrationcontrol circuit 50A updates an offset adjustment voltage +V_(os),during, for example, the track/hold phase of SAR ADC 10. A set oflogical-AND gates AND2-AND5, a pair of logical-OR gates OR2, OR3, and aninverter INV1, form a multiplexer that selects one of logic signal Earlyor logic signal Late to control a positive charge pump switch S20, andthe other one of logic signal Early or logic signal Late to control anegative charge pump switch S21, according to a control signal polarityprovided by SAR sequencer 60. A current source 110 and a current sourceI11, provide current pulses of positive or negative polarity,respectively, when switch S20 or switch S21 is activated, which causeincremental changes in offset adjustment voltage +V_(os), which is heldby a capacitor C10. A control signal Preamp ctl configures thepreamplifier of the comparator being calibrated, for example byoperating switches S10A, S10B, S11A and S11B of comparator 14A of FIG. 5, to force the inputs of the preamplifier to common-mode voltage V_(cm)during calibration. The operation of example calibration control circuit50A produces a pulse at every calibration cycle, which has a polarity asdetermined by a logical circuit or micro-program within SAR sequencerthat, in the depicted embodiment, implements a filter 62 thataccumulates decisions provided from the output of the comparator asinput signal decision to SAR sequencer 60 over multiple calibrationcycles to determine control signal polarity, which, in turn, determinesthe direction in which the charge pump updates offset adjustment voltage+V_(os). The width of the pulses is determined by a time delay Δt ofdelay circuit 20, which may be a fixed time delay, or may be a variabletime delay controlled by a control value T_(ADJ) provided from SARsequencer 60 to alter the rate of change of offset adjustment voltage+V_(os) according to the decision history accumulated by filter 62.Filter 62 may be a digital finite impulse response (FIR) filter thatprocesses the comparator decision history, which may then be used tocontrol the active time of the charge pump by adjusting control valueT_(ADJ). The selection of a response for filter 62 may be flexible,within the constraint that the calibration control loop remains stable,and an optimized FIR response may minimize the initial transientintroduced by the calibration intervals. An example FIR response may bea simple moving average of calibration decisions, and the active time Δtof the charge pump may have finite steps that may be determined based ona moving average output of filter 62. When offset adjustment voltageV_(os) converges to a final target voltage, the moving average output offilter 62 may be, for example 0.5, and active time Δt may be at aminimum in order to minimize ripple in offset adjustment voltage V_(os)after the calibration loop has settled to a proper offset compensationvalue. When the deviation of the output of filter 62 from the targetmidpoint value of 0.5 is significant, a longer active time Δt may beused to reduce the settling time of the calibration loop response. Thecontrol of control value T_(ADJ) may be flexible and may includewhatever resolution is desired, but generally a 2-bit adjustment(4-value range) may be sufficient. As an alternative to the FIR filterexample described above, filter 62 may be implemented with afast-Fourier transform (FFT) that allows analysis in the frequencydomain to compute the offset adjustment voltage V_(os) across multiplecycles, with unequal weighting applied to the terms at different samplesof the FFT to emphasize samples nearer in time to the presentcalibration interval. Similarly, the FIR filter may have tapcoefficients weighted in a similar manner.

Referring now to FIG. 7 , a block diagram of another example calibrationcontrol circuit 50B that may be used implement calibration controlcircuit 50 in background-calibrated comparator circuit 14A of FIG. 5 isshown, in accordance with another embodiment of the disclosure. Examplecalibration control circuit 50B is similar to example calibrationcontrol circuit 50A of FIG. 6 , so only differences between them will bedescribed below. In comparator implementations using calibration controlcircuit 50A of FIG. 6 , offset adjustment voltage +V_(os) provided atthe output of calibration control circuit 50A may vary with respect tothe bias voltage at the preamplifier and latch, e.g., bias voltage Vbapplied to example latch 20A or 20B of FIG. 3A or FIG. 3B, respectivelyfrom the bias output of preamplifier 30 of FIG. 4 , which is dependenton the symmetry of the power supply voltage, and thus degrades thecommon-mode rejection ratio (CMRR) of the comparator. The common-modevoltage variation results in an observable comparator noise acrosscalibration cycles, as offset adjustment voltage +V_(os) is continuallyadjusted to compensate for the variation of bias voltage V_(b), and theability to track the variation is limited by the offset adjustment rateand the bandwidth of filter 62. Example calibration control circuit 50Bprovides insensitivity to common-mode voltage variation by providingsymmetric control of a differential offset adjustment voltage V_(P),V_(N) that replace the common-mode bias voltage V_(b) and offsetadjustment voltage V_(os) that were supplied, for example to examplelatch circuit 20A of FIG. 3A and example latch circuit 20B of FIG. 3B.In example calibration control circuit 50B, the charge pump output isdetermined from two pairs of current sources I10A, I11A and I10B, I11B,that are applied by corresponding pairs of switches S20A, S21A and S20B,S21B to charge corresponding output capacitors C20A, C20B, that formfeedback paths of a fully-differential amplifier A20 that providesdifferential offset adjustment voltage V_(P), V_(N), with a common modevoltage controlled by bias voltage V_(b) resulting inV_(b)=(V_(P)+V_(N))/2, which is set to the common-mode voltage appliedto the preamplifier of the comparator during calibration.

Referring now to FIG. 8 , an example state diagram illustrating anexample operation of SAR sequencer 15 in SAR ADC 10 of FIG. 2 is shown,in accordance with an embodiment of the disclosure. During an evaluationphase 72, SAR sequencer 15 determines the bits of digital output valueD_(OUT) until the LSB has been evaluated. Then, the auto-zeropre-amplifier (preamp) state is set (state 74), i.e., the preamplifierinputs are disconnected from sample/hold block 12 and connected tocommon-mode voltage reference V_(CM), while at the same time,sample/hold block 12 is set to acquire analog input signal A_(IN) in atrack/hold (T/H) operation 73. While the T/H operation is proceeding,the charge pump within SAR sequencer 15 is updated based on the decisionoutput of comparator 14 (state 75), and the active time Δt of the chargepump is updated (state 76).

Referring now to FIG. 9 , a block diagram of an example built-inself-test (BIST) circuit 70 is shown, in accordance with an embodimentof the disclosure. While the above-described and illustrated examplesare generally directed to ADCs and specifically SAR ADCs, the techniquesdisclosed herein may be applied in other systems and circuits. ExampleBIST circuit 70 provides an example of a BIST architecture for use inanalog circuitry and that may be used to identify offset contributionsof different components in a signal chain. A modification is provided tocontrol offset adjustment voltage V_(os) digitally from adigitally-controlled reference voltage source or DAC 76, rather thanfrom a loop-controlled charge pump as in the above-described SARconverters. An input voltage is provided from an adjustable inputreference voltage source VR1, which is provided to a comparator 74through a plurality of cascaded analog stages, illustrated as amplifiersA30A, A30B and A30C, which all have the capability of implementing achopper-stabilized amplifier stage. BIST circuit 70 is calibrated bysetting adjustable input reference voltage source VR1 to zero andenabling chopping for all of amplifiers A30A, A30B and A30C, so that theindividual offsets of amplifiers A30A, A30B and A30C do not appear inoutput voltage VOUT. Then, offset inherent in each of amplifiers A30A,A30B and A30C may be identified by disabling chopping individually foreach of amplifiers A30A, A30B and A30C, which allows the individualoffsets of amplifiers A30A, A30B and A30C to individually appear in theresulting decision output decision. The digitally-controlled offsetvoltage V_(os) provided by DAC 76 is digitally swept and a digital codeD_(o) is determined from decision output decision, such that the densityof logical “1” (or logical “0”) values is at 50% of the total count. Theresulting D_(o) value is the offset contribution from comparator 74,when input voltage Vin=0. Next, input voltage Vin is swept and digitalcodes at 50% density are obtained by varying to obtain a mapping of theoffset of comparator 74 vs input voltage Vin, which may be expressed asa slope k around the zero-referenced D_(o) value. A linear region overwhich slope k is valid may be determined by sweeping input voltage Vinuntil the decision count saturates at 100% and 0%, which is the range ofreferred offset that may be measured by example BIST circuit 70. Thecomparator offset referred back to the input may be calculated as−(D_(o)/k). Finally, the individual ones of amplifiers A30A, A30B andA30C are offset-observed by turning off chopping action around theselected one of amplifiers A30A, A30B and A30C, and determining digitalcodes D_(N) where the output density of decision output decision is a50%, where N is the index of the amplifier being evaluated, i.e., theamplifier for which chopping is disabled and the input-referred offsetcontributed by each amplifier N may then be found from (D_(N)−D_(o))/k.

Referring now to FIGS. 10-12 , example graphs illustrating operation andperformance of SAR ADC 10 of FIG. 2 are shown, in accordance with anembodiment of the disclosure. The depicted waveforms are simulatedwaveforms from a design example of a 12-bit SAR ADC having backgroundcalibration as described above. In the particular design example, thecharge pump active time Δt is chosen such that:

${\Delta t} = \left\{ \begin{matrix}{{❘{{{FIR}\left\lbrack {D\left( {n - N + {1:n}} \right)} \right\rbrack} - 0.5}❘} > {D_{1}:}} & {\Delta T_{\max}} \\{\left. {{❘{{{FIR}\left\lbrack {D\left( {n - N + {1:n}} \right)} \right\rbrack} - 0.5}❘} \in \left( {D_{2},D_{1}} \right.} \right\rbrack:} & {\Delta T_{1}} \\{\left. {{❘{{{FIR}\left\lbrack {D\left( {n - N + {1:n}} \right)} \right\rbrack} - 0.5}❘} \in \left( {D_{3},D_{2}} \right.} \right\rbrack:} & {\Delta T_{2}} \\{{❘{{{FIR}\left\lbrack {D\left( {n - N + {1:n}} \right)} \right\rbrack} - 0.5}❘} \leq {D_{3}:}} & {\Delta T_{\min}}\end{matrix} \right.$

D₁, D₂, D₃, ΔT_(max), ΔT₁, ΔT₂ and ΔT_(min) are parameters to beoptimized to minimize the initial transient time of calibration andripple of the settled value of offset adjustment voltage V_(os). In thewaveforms depicted in FIG. 10 , waveform 101 is a sinusoidal inputsignal provided to the SAR ADC and waveform 102 is the ADC output codesequence. Waveform 103 is the FIR-filtered output of the decision outputof the comparator latch, waveform 104 is the charge pump active timeadjustment code (control value T_(ADJ)) and waveform 105 is thecalibrated offset adjustment voltage V_(os). The maximum value of thecharge pump active time ΔT_(max) is used, between times T1 and T2, toshorten the initial transient due to calibration. As the calibratedvalue of offset adjustment voltage V_(os) converges to a target value,the charge pump active time adjustment code (control value T_(ADJ)) isreduced between time T2 and time T3 to decrease charge pump active timeΔt gradually, until after time T3 when the calibrated value of offsetadjustment voltage V_(os) has converged to the target value, the minimumcharge pump active time adjustment code (control value T_(ADJ)) is usedto reduce charge pump active time Δt to ΔT_(min), thus the ripple of thesettled value of offset adjustment voltage V_(os) is minimized.

FIG. 11 illustrates further details of the calibration control of FIG.10 during the initial transient of adjustment to the value of offsetadjustment voltage V_(os). Time T0 occurs at the end of a comparatorauto-zero phase of one calibration cycle, when the comparator makes acalibration decision at the rising edge of the clock signal indicated bywaveform 115. In the depicted example, the decision, shown as waveform116, is a logical “1”, and the charge pump charges the outputcapacitor(s) to an increased step in offset adjustment voltage V_(os)voltage shown by waveform 114. Subsequently, the SAR ADC enters asuccessive approximation (evaluation) phase to convert the currentsample. Subsequent intervals show pairs of calibration/evaluationphases, as offset adjustment voltage V_(os) voltage increases as thecalibration control loop converges. Waveform 111 is clock signal clk,waveform 112 is the calibration phase command signal, and waveform 113is the SAR error, which approaches zero, illustrating the conversionevaluation successively approximating the target digital output code.FIG. 12 illustrates an FFT of the output of SAR ADC 10. Outputdistortion is dominated by the third harmonic 122, which is −80 dB belowthe level of the signal amplitude 121, which is sufficient forimplementation of a 12-bit ADC.

In summary, this disclosure shows and describes circuits and integratedcircuits implementing an on-line calibrated comparator, and theirmethods of operation. The systems include comprising an analog circuitand an analog signal comparator that compares outputs of the analogcircuit. The analog signal comparator may include a preamplifier stageand a decision latch that samples an output of the preamplifier stage togenerate an output state of the analog signal comparator. The systemsalso may include a switching circuit that selectively couples outputs ofthe analog circuit to inputs of the preamplifier stage of the analogsignal comparator and a state control logic that alternatively operatesthe system in a first phase in which the analog circuit acquires aninput signal and the analog signal comparator is being calibrated, and asecond phase in which an output of the analog circuit is compared by theanalog signal comparator. A sampling cycle may include operating thesystem in the first phase and then the second phase, wherein in thefirst phase, the state control logic controls the switching circuit todisconnect the outputs of the analog circuit from the inputs of thepreamplifier stage of the analog signal comparator, and wherein theswitching circuit applies a common mode reference to the inputs of thepreamplifier stage of the analog signal comparator. The systems may alsoinclude an offset correction circuit that determines an offsetcorrection change dependent on a history of states of an output of thedecision latch of the analog signal comparator across multiple samplingcycles of the system. An output of the offset correction circuit may becoupled to an offset input of the decision latch of the analog signalcomparator to adjust a threshold voltage of the decision latch inconformity with the history of the states of the output of the decisionlatch.

In some example embodiments, the offset correction circuit may determinethe offset correction change by applying a non-equal weighting tomultiple samples of the output of the decision latch. In some exampleembodiments, the offset correction circuit may apply a fast-Fourieranalysis to the multiple samples of the sampling to determine the offsetcorrection change. In some example embodiments, the system may be ananalog-to-digital converter, wherein the first phase is a track/holdphase of the analog-to-digital converter, and wherein the second phaseis a conversion phase of the analog-to-digital converter. In otherexample embodiments, the system may be a built-in-self-test (BIST)circuit within analog circuitry, wherein the first phase is a signalmeasurement phase of the BIST circuit, and wherein the second phase isan evaluation phase of the BIST circuit.

In some example embodiments, the offset correction circuit may include acharge pump that applies the offset correction change to a capacitorstoring an offset value that is applied to the offset input of thedecision latch. In some example embodiments, the charge pump may includea differential integrator, a pair of charging circuits that applydifferential reference currents to inputs of the differential integratorwith an alternating polarity, and control logic that controls a time ofalternation of the polarity of the pair of charging circuits during thesecond phases of the state control logic, so that the differentialintegrator is charged in proportion to the determined offset correctionchange. In some example embodiments, an active time of the charge pumpis varied in conformity with a magnitude of the offset correctionchange, so that a calibration time of the decision latch across multiplesampling cycles is reduced and residual ripple after calibration isreduced in magnitude.

In some example embodiments, the decision latch of the analog comparatormay include a pair of cross-coupled latch stages for receiving a clocksignal and capturing an output state of the decision latch in responseto the clock signal, at least one tail device having an input forreceiving the clock signal, a first pair of input ladder stages coupledbetween corresponding ones of the pair of cross-coupled latch stages andthe at least one tail device for receiving the output of thepreamplifier stage, whereby the cross-coupled latch stages capture astate determined by conduction of the first pair of input stages inresponse to the clock signal, and a second pair of input ladder stagescoupled between corresponding ones of the pair of cross-coupled latchstages and the at least one tail device for receiving the output of theoffset correction circuit, whereby the output of the offset correctioncircuit adjusts a threshold of the conduction of the first pair of inputstages that determines the state captured by the cross-coupled latchstages. In some example embodiments, the clock signal may be a firstclock signal, and the at least one tail device may include a first taildevice coupled to the first pair of input ladder stages and that iscontrolled by the first clock signal, a second tail device coupled tothe second pair of input ladder stages for receiving the second clocksignal, and a variable delay circuit having an input coupled to theoutput of the offset correction circuit and an output providing thesecond clock signal to the second tail device, whereby the offsetcorrection circuit varies a delay of the variable delay circuitaccording to the offset correction change. In some example embodiments,the system may further include a digital-to-analog converter having aninput coupled to the output of the offset correction circuit forgenerating a differential offset voltage applied to inputs of the secondpair of input ladder stages.

It should be understood, especially by those having ordinary skill inthe art with the benefit of this disclosure, that the various operationsdescribed herein, particularly in connection with the figures, may beimplemented by other circuitry or other hardware components. The orderin which each operation of a given method is performed may be changed,and various elements of the systems illustrated herein may be added,reordered, combined, omitted, modified, etc. It is intended that thisdisclosure embrace all such modifications and changes and, accordingly,the above description should be regarded in an illustrative rather thana restrictive sense. Similarly, although this disclosure makes referenceto specific embodiments, certain modifications and changes may be madeto those embodiments without departing from the scope and coverage ofthis disclosure. Moreover, any benefits, advantages, or solutions toproblems that are described herein with regard to specific embodimentsare not intended to be construed as a critical, required, or essentialfeature or element.

While the disclosure has shown and described particular embodiments ofthe techniques disclosed herein, it will be understood by those skilledin the art that the foregoing and other changes in form, and details maybe made therein without departing from the spirit and scope of thedisclosure. For example, the techniques shown above may be applied to asignal comparator used in other operations, such as a signal detector.

What is claimed is:
 1. A system, comprising: an analog circuit; ananalog signal comparator that compares outputs of the analog circuit,the analog signal comparator comprising a preamplifier stage and adecision latch that samples an output of the preamplifier stage togenerate an output state of the analog signal comparator; a switchingcircuit that selectively couples outputs of the analog circuit to inputsof the preamplifier stage of the analog signal comparator; a statecontrol logic that alternatively operates the system in a first phase inwhich the analog circuit acquires an input signal and the analog signalcomparator is being calibrated, and a second phase in which an output ofthe analog circuit is compared by the analog signal comparator, whereina sampling cycle comprises operating the system in the first phase andthen the second phase, wherein in the first phase, the state controllogic controls the switching circuit to disconnect the outputs of theanalog circuit from the inputs of the preamplifier stage of the analogsignal comparator, and wherein the switching circuit applies a commonmode reference to the inputs of the preamplifier stage of the analogsignal comparator; and an offset correction circuit that determines anoffset correction change dependent on a history of states of an outputof the decision latch of the analog signal comparator across multiplesampling cycles of the system, wherein an output of the offsetcorrection circuit is coupled to an offset input of the decision latchof the analog signal comparator to adjust a threshold voltage of thedecision latch in conformity with the history of the states of theoutput of the decision latch.
 2. The system of claim 1, wherein theoffset correction circuit determines the offset correction change byapplying a non-equal weighting to multiple samples of the output of thedecision latch.
 3. The system of claim 2, wherein the offset correctioncircuit applies a fast-Fourier analysis to the multiple samples of thesampling to determine the offset correction change.
 4. The system ofclaim 1, wherein the system is an analog-to-digital converter, whereinthe first phase is a track/hold phase of the analog-to-digitalconverter, and wherein the second phase is a conversion phase of theanalog-to-digital converter.
 5. The system of claim 1, wherein thesystem is a built-in-self-test (BIST) circuit within analog circuitry,wherein the first phase is a signal measurement phase of the BISTcircuit, and wherein the second phase is an evaluation phase of the BISTcircuit.
 6. The system of claim 1, wherein the offset correction circuitcomprises a charge pump that applies the offset correction change to acapacitor storing an offset value that is applied to the offset input ofthe decision latch.
 7. The system of claim 6, wherein the charge pumpcomprises: a differential integrator; a pair of charging circuits thatapply differential reference currents to inputs of the differentialintegrator with an alternating polarity; and control logic that controlsa time of alternation of the polarity of the pair of charging circuitsduring the second phases of the state control logic, so that thedifferential integrator is charged in proportion to the determinedoffset correction change.
 8. The system of claim 6, wherein an activetime of the charge pump is varied in conformity with a magnitude of theoffset correction change, so that a calibration time of the decisionlatch across multiple sampling cycles is reduced and residual rippleafter calibration is reduced in magnitude.
 9. The system of claim 1,wherein the decision latch of the analog comparator comprises: a pair ofcross-coupled latch stages for receiving a clock signal and capturing anoutput state of the decision latch in response to the clock signal; atleast one tail device having an input for receiving the clock signal; afirst pair of input ladder stages coupled between corresponding ones ofthe pair of cross-coupled latch stages and the at least one tail devicefor receiving the output of the preamplifier stage, whereby thecross-coupled latch stages capture a state determined by conduction ofthe first pair of input stages in response to the clock signal; and asecond pair of input ladder stages coupled between corresponding ones ofthe pair of cross-coupled latch stages and the at least one tail devicefor receiving the output of the offset correction circuit, whereby theoutput of the offset correction circuit adjusts a threshold of theconduction of the first pair of input stages that determines the statecaptured by the cross-coupled latch stages.
 10. The system of claim 9,wherein the clock signal is a first clock signal, and wherein the atleast one tail device comprises: a first tail device coupled to thefirst pair of input ladder stages and that is controlled by the firstclock signal; a second tail device coupled to the second pair of inputladder stages for receiving the second clock signal; and a variabledelay circuit having an input coupled to the output of the offsetcorrection circuit and an output providing the second clock signal tothe second tail device, whereby the offset correction circuit varies adelay of the variable delay circuit according to the offset correctionchange.
 11. The system of claim 9, further comprising adigital-to-analog converter having an input coupled to the output of theoffset correction circuit for generating a differential offset voltageapplied to inputs of the second pair of input ladder stages.
 12. Amethod of calibrating a system including an analog circuit and an analogsignal comparator that compares outputs of an analog circuit, the methodcomprising: alternatively operating the system in a first phase in whichthe analog circuit acquires an input signal and the analog signalcomparator is being calibrated, and a second phase in which the outputsof the analog circuit are compared by the analog signal comparator,wherein a sampling cycle comprises operating the system in the firstphase and then the second phase; in the first phase, disconnecting theoutputs of the analog circuit from inputs of a preamplifier stage of theanalog signal comparator and applying a common mode reference to theinputs of the preamplifier stage of the analog signal comparator whilesampling an output of the preamplifier stage of the analog signalcomparator with a decision latch of the analog signal comparator;determining an offset correction change dependent on a history of statesof an output of the decision latch of the analog signal comparatoracross multiple sampling cycles of the system; and applying the offsetcorrection change to an offset input of the decision latch of the analogsignal comparator to adjust a threshold voltage of the decision latch inconformity with the history of the states of the output of the decisionlatch.
 13. The method of claim 12, wherein the determining an offsetcorrection change combines multiple samples of the sampling with anon-equal weighting.
 14. The method of claim 13, wherein the determiningan offset correction change performs a fast-Fourier analysis of themultiple samples of the sampling to determine the offset correctionchange.
 15. The method of claim 12, wherein the system is ananalog-to-digital converter, wherein the first phase is a track/holdphase of the analog-to-digital converter, and wherein the second phaseis a conversion phase of the analog-to-digital converter.
 16. The methodof claim 12, wherein the system is a built-in-self-test (BIST) circuitwithin analog circuitry, wherein the first phase is a signal measurementphase of the BIST circuit, and wherein the second phase is an evaluationphase of the BIST circuit.
 17. The method of claim 12, wherein theapplying the offset correction change comprises applying charge to orremoving charge from a capacitor storing an offset value that is appliedto the offset input of the decision latch.
 18. The method of claim 17,wherein the applying charge to or removing charge from the capacitorcomprises: accepting or providing the charge at inputs of a differentialintegrator by reference currents with an alternating polarity; andcontrolling a time of alternation of the polarity of the referencecurrents during the second phases of the system, so that thedifferential integrator is charged in proportion to the determinedoffset correction change.
 19. The method of claim 17, wherein an activetime of the applying or removing charge is varied in conformity with amagnitude of the offset correction change, so that a calibration time ofthe decision latch across multiple sampling cycles is reduced andresidual ripple after calibration is reduced in magnitude.
 20. Themethod of claim 12, wherein the decision latch of the analog comparatorcomprises a pair of cross-coupled latch stages for receiving a clocksignal and capturing an output state of the decision latch in responseto the clock signal, at least one tail device having an input forreceiving the clock signal a first pair of input ladder stages coupledbetween corresponding ones of the pair of cross-coupled latch stages andthe at least one tail device for receiving the output of thepreamplifier stage, whereby the cross-coupled latch stages capture astate determined by conduction of the first pair of input stages inresponse to the clock signal, and a second pair of input ladder stagescoupled between corresponding ones of the pair of cross-coupled latchstages and the at least one tail device, and wherein the applying theoffset correction change adjusts input voltages of the second pair ofinput ladder stages to adjust a threshold of the conduction of the firstpair of input stages that determines the state captured by thecross-coupled latch stages.
 21. The method of claim 20, wherein theclock signal is a first clock signal, wherein the at least one taildevice comprises a first tail device coupled to the first pair of inputladder stages and that is controlled by the first clock signal and asecond tail device coupled to the second pair of input ladder stages forreceiving the second clock signal, and wherein the applying thecorrection adjusts a variable delay of the second clock signal withrespect to the first clock signal.
 22. The method of claim 20, whereinthe applying the correction comprises converting a digital offsetcorrection change to a differential analog offset voltage with adigital-to-analog converter, and applying the differential analog offsetvoltage to inputs of the second pair of input ladder stages.